<template>
  <view class="template-photo">
    <!-- 顶部自定义导航 -->
    <tn-nav-bar fixed alpha customBack>
      <view slot="back" class='tn-custom-nav-bar__back'
        @click="goBack">
        <text class='icon tn-icon-left'></text>
        <text class='icon tn-icon-home-capsule-fill'></text>
      </view>
    </tn-nav-bar>
    
    
    <!-- 页面内容 -->
    <view class="slideshow">
      <view class="slideshow-image" :style="'background-image:url('+ url +')'"></view>
    </view>
    
  </view>
</template>

<script>
  import template_page_mixin from '@/uni_modules/tuniao-ui/libs/mixin/template_page_mixin.js'
  export default {
    name: 'TemplatePhoto',
    mixins: [template_page_mixin],
    data(){
      return {
        url: '',
        }
    },
	onLoad(e) {
		this.url=e.url;
	},
    methods: {
      
    }
  }
</script>

<style lang="scss" scoped>
  .template-photo {
    margin: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
	background-color: black;
  }
  
  /* 胶囊*/
  .tn-custom-nav-bar__back {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 1000rpx;
    border: 1rpx solid rgba(255, 255, 255, 0.5);
    color: #FFFFFF;
    font-size: 18px;
    
    .icon {
      display: block;
      flex: 1;
      margin: auto;
      text-align: center;
    }
    
    &:before {
      content: " ";
      width: 1rpx;
      height: 110%;
      position: absolute;
      top: 22.5%;
      left: 0;
      right: 0;
      margin: auto;
      transform: scale(0.5);
      transform-origin: 0 0;
      pointer-events: none;
      box-sizing: border-box;
      opacity: 0.7;
      background-color: #FFFFFF;
    }
  }
  
  
  
  /* 相册 start*/
  .slideshow {
    top: 0;
    position: absolute;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
  }
  
  .slideshow-image {
    position: absolute;
    width: 100%;
    height: 100%;
    background: no-repeat 50% 50%;
    background-size: contain;
    // -webkit-animation-name: kenburns;
    //         animation-name: kenburns;
    // -webkit-animation-timing-function: linear;
    //         animation-timing-function: linear;
    // -webkit-animation-iteration-count: infinite;
    //         animation-iteration-count: infinite;
    // -webkit-animation-duration: 20s;
    //         animation-duration: 20s;
    // opacity: 1;
    // transform: scale(1.2);
  }
  .slideshow-image:nth-child(1) {
    -webkit-animation-name: kenburns-1;
            animation-name: kenburns-1;
    z-index: 3;
  }
  
  @-webkit-keyframes kenburns-1 {
    0% {
      opacity: 1;
      transform: scale(1.2);
    }
    1.5625% {
      opacity: 1;
    }
    23.4375% {
      opacity: 1;
    }
    26.5625% {
      opacity: 1;
      transform: scale(1);
    }
    100% {
      opacity: 1;
      transform: scale(1.2);
    }
    98.4375% {
      opacity: 1;
      transform: scale(1.2117647059);
    }
    100% {
      opacity: 1;
    }
  }
  
  @keyframes kenburns-1 {
    0% {
      opacity: 1;
      transform: scale(1.2);
    }
    1.5625% {
      opacity: 1;
    }
    23.4375% {
      opacity: 1;
    }
    26.5625% {
      opacity: 1;
      transform: scale(1);
    }
    100% {
      opacity: 1;
      transform: scale(1.2);
    }
    98.4375% {
      opacity: 1;
      transform: scale(1.2117647059);
    }
    100% {
      opacity: 1;
    }
  }
    
 
    
</style>
